package softwaretest.dto;
import java.time.LocalDateTime;

public class DeviceDataDTO {
    private LocalDateTime createdAt; // 数据创建时间
    private Double value; // 设备数据的值

    // 无参构造方法
    public DeviceDataDTO() {
    }

    // 带参构造方法，用于从实体类转换
    public DeviceDataDTO(LocalDateTime createdAt, Double value) {
        this.createdAt = createdAt;
        this.value = value;
    }

    // Getter 和 Setter 方法
    public LocalDateTime getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(LocalDateTime createdAt) {
        this.createdAt = createdAt;
    }

    public Double getValue() {
        return value;
    }

    public void setValue(Double value) {
        this.value = value;
    }

    // toString 方法（可选）
    @Override
    public String toString() {
        return "DeviceDataDTO{" +
                "createdAt=" + createdAt +
                ", value=" + value +
                '}';
    }
}
